<script type="text/javascript">
	function loginCilck() {
		var username = $('#username').attr('value');
		var password = $('#password').attr('value');
		var vaildcode = $('#vaildcode').attr('value');
		if(username == "" || username == null || username == undefined){
			$('#errorMsg').html("帐号不能为空！");
			return;
		}
		
		if(password == "" || password == null || password == undefined){
			$('#errorMsg').html("密码不能为空！");
			return;
		}
		
		if(vaildcode == "" || vaildcode == null || vaildcode == undefined){
			$('#errorMsg').html("验证码不能为空！");
			return;
		}
		
		$('#passwordMD5').attr('value',hex_md5(password));
		
		$('#loginForm').submit();
	}
	
	
	function refresh(img) {
		img.src = "${basePath}validateCode.do?t="+new Date().getTime();
	}
	
	function keyDown(event){
		if(event.keyCode == 13)
		{
			loginCilck();
		}
	}
	
</script>
<!-- S 主体区域 -->
<section class="login-area">
	<article class="news">
		<ul class="news-list">
			<li>乐共享-积分购物商城-消费增值平台-中国O2O代表</li>
			<li>消费增值,积分购物,购物商城,乐共享,积分商城,O2O商城</li>
		</ul>
	</article>
	<div class="login-box">
		<h1>乐共享会员登陆</h1>
		<form action="${basePath}login/userLogin.htm" method="post" name="loginForm" id="loginForm">
			<fieldset>
				<legend>乐共享会员登陆</legend>
				<div class="pass-area">
					<label for="account" class="t">账　号</label><input type="text" id="username" name="username" class="input-txt" />
					<!--<div class="login-tips"><p class="tips">手机号码也可以登录<span class="colse" title="关闭">x</span><b></b></p></div>-->
				</div>
				<div class="pass-area">
					<label for="password" class="t">密     码</label>
					<input type="password" id="password" name="password" class="input-txt" />
					<input type="hidden" id="passwordMD5" name="passwordMD5"/>
					<span class="mess"></span>
				</div>
				<div class="code-area">
					<label for="code" class="t">验证码</label><input type="text" id="vaildcode" name="vaildcode" class="input-txt" onKeyDown="keyDown(event)"/><span class="code-img">
					<img src="${basePath}validateCode.do" onclick="refresh(this)" title="点击换一个" alt="点击换一个" /></span>
				</div>
				
				<div class="remember">
					<label id="errorMsg"></label>
					<#if errorMsgUser?exists>
						<font color="red">${errorMsgUser}</font>
					</#if>
					<#if errorMsgVaildcode?exists>
						<font color="red">${errorMsgVaildcode}</font>
					</#if>
				</div>
				<div class="act-area">
					<input type="button" onclick="loginCilck()" value="登　陆" class="submit-act" />
				</div>
				<!--<div class="entries">
					还没有乐共享会员帐号？<a href="#">立即注册</a>
				</div>-->
			</fieldset>
		</form>
	</div>
</section>
<!-- E 主体区域 -->